<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>wireless_tools</title>
  </head>

  <body>
    <div
      id="app"
      class="flex"
      style="height: 100vh; width: 100vw; padding: 0"
    ></div>
    <script type="module" src="/src/main.ts"></script>
  </body>
  <script>
    const link = document.querySelector("link[rel~='icon']");
    window.tools_icon = btoa(
      '<svg t="1722412751955" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7981"> <path d="M21.333333 250.709333L508.970667 0l487.594666 250.709333v515.498667L509.013333 1024 21.333333 766.208z" fill="#4A90E2" p-id="7982"></path> <path d="M474.837333 517.930667v262.272h68.266667V520.106667l307.2-195.029334-68.266667-32.512-273.066666 162.56-273.066667-162.56-68.266667 32.512z" fill="#FFFFFF" p-id="7983"></path> </svg>'
    );
    link.href = "data:image/svg+xml;base64," + tools_icon;
    window.onload = function () {
      history.replaceState(
        null,
        null,
        window.location.href.replace("/index", "")
      );
      if (localStorage.getItem("new_md5")) {
        let last_md5 = localStorage.getItem("md5");
        let cur_md5 = localStorage.getItem("new_md5");
        if (last_md5 != cur_md5) {
          localStorage.setItem("md5", localStorage.getItem("new_md5"));
          window.newVersion = true;
        }
      }
      // 缓存页面内容
      var currentPageContent = document.documentElement.outerHTML;
      localStorage.setItem("cachedPage", currentPageContent);
    };
  </script>
</html>
